#!/bin/bash

GXCC_IP="10.0.0.166"

TEST_LOCAL_PATH="/root/test"
TEST_GXCC_PATH="/data/test"

LOCAL_PATH=${TEST_LOCAL_PATH}
GXCC_PATH=${TEST_GXCC_PATH}

mount | grep ${LOCAL_PATH} > /dev/null
if [ $? -eq 0 ];then
    mount | grep ${LOCAL_PATH} | grep ${GXCC_IP}:${GXCC_PATH} > /dev/null
    if [ $? -eq 0 ];then
	echo "${LOCAL_PATH}已挂载${GXCC_IP}:${GXCC_PATH}，正确"
    else
	echo "${LOCAL_PATH}已挂载未知路径，错误"
    fi
else
    echo "${MOUNT_DIR}未挂载，尝试挂载${GXCC_IP}:${GXCC_PATH}"
    mount -t nfs -o soft,timeo=30,retry=3 ${GXCC_IP}:${GXCC_PATH} ${LOCAL_PATH}
fi
